<?php

/*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register all of the routes for an application.
  | It is a breeze. Simply tell Lumen the URIs it should respond to
  | and give it the Closure to call when that URI is requested.
  |
 */

//$app->get('/', function () use ($app) {
//    return $app->version();
//});
//$app->get('/readLogs', 'SysController@readLogs');
//测试观察者
$app->get('/test/observer', 'TestController@testNotify');
//获取lumen日志
$app->get('/', function () use ($app){
    echo 'Welcome to BeiJing !';
    exit();
});
$app->group(['middleware' => 'before'], function () use ($app) {
    
    $app->post('/sendLogsToServer', 'SysController@sendLogsToServer');
    $app->post('/snycDBModel', 'SysController@snycDBModel');
    //post：获取验证码   
    $app->post('/user/getVerifyCode', 'UserController@getVerifyCode');
    //post：注册  
    $app->post('/user/login', 'UserController@login');
    //更新用户信息
    $app->post('/user/updateUserInfo', 'UserController@updateUserInfo');
    //用户收藏
    $app->post('/user/addFavorite', 'UserController@addFavorite');
    //用户取消收藏
    $app->post('/user/delFavorite', 'UserController@delFavorite');
    //获取收藏列表
    $app->get('/user/getFavoriteList', 'UserController@getFavoriteList');
    //用户预定
    $app->post('/user/addBook', 'UserController@addBook');
    //用户取消预订
    $app->post('/user/delBook', 'UserController@delBook');
    //用户关注
    $app->post('/user/addAttention', 'UserController@addAttention');
    //用户取消关注
    $app->post('/user/delAttention', 'UserController@delAttention');
    //发礼物
    $app->post('/user/sendGift', 'UserController@sendGift');
    
    //获取用户信息
    $app->get('/user/getUserInfo', 'UserController@getUserInfo');
    //获取用户历史记录
    $app->get('/user/getHistoryLog', 'UserController@getHistoryLog');
    
    
    //获取lumen日志
    $app->get('/readLogs', 'SysController@readLogs');
    //七牛token
    $app->get('/base/qiNiuUpToken', 'SysController@qiNiuUpToken');
    
    //获取config
    $app->get('/base/getConfig', 'SysController@getConfig');
    
     //获取直播间固定的评论列表
    $app->get('/chat/getQuickMsgList', 'ChatController@getQuickMsgList');
    
    //获取直播间礼物列表
    $app->get('/gift/getGiftList', 'GiftController@getGiftList');
    
    //获取直播分类
    $app->get('/live/getCategoryLive', 'LiveController@getCategoryLive');
    
   
    
    //获取机构信息
    $app->get('/organization/getOrganizationInfo', 'OrganizationController@getOrganizationInfo');
    
    //获取启动页
    $app->get('/base/getStartupHomepage', 'SysController@getStartupHomepage');
    
    //获取直播列表
    $app->get('/live/getLiveList', 'LiveController@getLiveList');

    
    //获取机构／用户的直播列表
    $app->get('/live/getUserLiveList', 'LiveController@getUserLiveList');
    
    //获取直播详情页
    $app->get('/live/getLiveDetail', 'LiveController@getLiveDetail');
    
    //获取精选
    $app->get('/live/getChosen', 'LiveController@getChosen');
    
    //获取直播相关推荐
    $app->get('/live/getRecommendLive', 'LiveController@getRecommendLive');
    
    //获取轮播推荐
    $app->get('/live/getLunboLive', 'LiveController@getLunboLive');
    
    //预定接口
    $app->post('/live/bookLive', 'LiveController@bookLive');
}
);

